﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using System.Reflection;

using HeinQi.Framework.Common;
using TbShop.Web.Infrastructure;
using FluentScheduler;
using TbShop.Data.Components;
using System.Data.Entity;

namespace TbShop.Web
{
    public class MvcApplication : System.Web.HttpApplication
    {
        protected void Application_Start()
        {
            Database.SetInitializer<TbShopDBContext>(null);
            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            DataMapperHelper.InitMapping();

            LogHelper.InitConfig();

            JobManager.Initialize(new FluentRegistry());
        }
    }
}
